<template>
  <div class="main">
    <div @click="openMask">打开弹窗</div>
    <dialog-bar v-model="sendVal" type="danger" title="我是标题" content="我是内容" danger-text="Delete" @cancel="clickCancel()" @danger="clickDanger()" @confirm="clickConfirm()" />
  </div>
</template>
<script>
import dialogBar from './dialog.vue'
export default {
  components: {
    'dialog-bar': dialogBar
  },
  data() {
    return {
      sendVal: false
    }
  },
  methods: {
    openMask(index) {
      this.sendVal = true
    },
    clickCancel() {
      console.log('点击了取消')
    },
    clickDanger() {
      console.log('这里是danger回调')
    },
    clickConfirm() {
      console.log('点击了confirm')
    }
  }
}
</script>
<style lang="less" scoped>

</style>

